const lazyDirective = {

    mounted(el, binding, vnode) {
        el.proxy = new Image()
        el.proxy.src = el.src
        el.proxy.onload = e => {
            el.src = el.proxy.src
        }

        el.src = binding.value
    },

    unmounted(el, binding, vnode) {
        delete el.proxy
    },
}

export default lazyDirective